<template>
  <el-table :data="tableData" border style="width: 100%">
    <el-table-column prop="rid" label="角色id"> </el-table-column>
    <el-table-column prop="rname" label="角色名称"> </el-table-column>
    <el-table-column
      fixed="right"
      label="操作"
      width="100">
      <template slot-scope="scope">
        <el-button @click="handleClick(scope.row.rname)" type="text" size="small">修改</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>
<script>
export default {
  data() {
    return {
      tableData: [],
    };
  },
  mounted() {
      var my=this;
      my.zs();
  },
  methods: {
    handleClick(row) {
      console.log(row);
    },
    zs(){
        var my=this;
        this.$axios.get(this.$apiurl.apiurl+"Getrole").then(function (s) {
            my.tableData=s.data.modlist;
        })
    }
  },
};
</script>